Linux 101 hacks New edition by Ulysse Valleux

Linux 101 hacks New edition by Ulysse Valleux

Author:Ulysse Valleux [Valleux, Ulysse]
Language: eng
Format: azw3
Publisher: UNKNOWN
Published: 2018-10-02T16:00:00+00:00


Hack 57. Mount a Partition

After creating a partition and formatting, you can mount it to a mount point.

First create a directory where the partition should be mounted.

# mkdir /home/database

Mount the file system.

# mount /dev/sda1 /home/database

To automatically mount the filesystem after the reboot, add the following entry to the /etc/fstab

/dev/sda1 /home/database ext3 defaults 0 2

Hack 58. Fine Tune a Partition Using tune2fs

Use the tune2fs –l /dev/sda1 to view the filesystem information as shown below. # tune2fs -l /dev/sda1

tune2fs 1.35 (28-Feb-2004)

Filesystem volume name: /home/database

Last mounted on: <not available>

Filesystem UUID: f1234556-e123-1234-abcdbbbbaaaaae11 Filesystem magic number: 0xEF44

Filesystem revision #: 1 (dynamic)

Filesystem features: resize_inode filetype sparse_super Default mount options: (none)

Filesystem state: not clean

Errors behavior: Continue

Filesystem OS type: Linux

Inode count: 1094912

Block count: 140138994

Reserved block count: 0

Free blocks: 16848481

Free inodes: 1014969

First block: 0

Block size: 2048

Fragment size: 2048

Reserved GDT blocks: 512

Blocks per group: 16384

Fragments per group: 16384

Inodes per group: 128

Inode blocks per group: 8

Filesystem created: Tue Jul 1 00:06:03 2008 Last mount time: Thu Aug 21 05:58:25 2008 Last write time: Fri Jan 2 15:40:36 2009 Mount count: 2

Maximum mount count: 20

Last checked: Tue Jul 1 00:06:03 2008 Check interval: 15552000 (6 months) Next check after: Sat Dec 27 23:06:03 2008 Reserved blocks uid: 0 (user root)

Reserved blocks gid: 0 (group root) First inode: 11

Inode size: 128

Default directory hash: tea

Directory Hash Seed: 12345829-1236-4123-9aaaccccc123292b You can also use the tune2fs to tune the ex2/ext3 filesystem parameter. For example, if you want to change the Filesystem volume name, you can do it as shown below.

# tune2fs -l /dev/sda1 | grep volume Filesystem volume name: /home/database

# tune2fs -L database-home /dev/emcpowera1 tune2fs 1.35 (28-Feb-2004)

# tune2fs -l /dev/sda1 | grep volume Filesystem volume name: database-home



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.